package com.niiwoo.civet.trade.service.local.notify.impl;

import org.springframework.stereotype.Component;

import com.niiwoo.civet.trade.enums.NotifyTypeEnum;
import com.niiwoo.civet.trade.service.local.newRefund.notify.dto.RefundNotifyMessageDTO;
import com.niiwoo.civet.user.dto.request.UserLetterRequestDTO;
import com.niiwoo.civet.user.enums.MessageTemplateKeyEnum;

/**
 * @Author: wuke
 * @Description:
 * @Date: Created in 11:32 2018/1/27
 */
@Component
public class ProjectRepaymentSuccessNotifier extends AbstractRepaymentSuccessNotifier<RefundNotifyMessageDTO> {

    @Override
    protected UserLetterRequestDTO getUserLetterRequestDTO(UserNotifyInfo info) {
        UserLetterRequestDTO userLetterRequestDTO = super.getUserLetterRequestDTO(info);
        userLetterRequestDTO.setLetterTemplateEnum(MessageTemplateKeyEnum.LetterTemplateKeyEnum.BORROW_REPAYMENT_SUCCESS);
        userLetterRequestDTO.setJpushTemplateKeyEnum(MessageTemplateKeyEnum.JPushTemplateKeyEnum.BORROW_REPAYMENT_SUCCESS);

        return userLetterRequestDTO;
    }

    @Override
    protected NotifyTypeEnum getType() {
        return NotifyTypeEnum.JS017;
    }
}
